# 初始化结果变量
result = 0

# 计算并累加阶乘
for i in range(1, 11):
    a = 1
    for j in range(1, i + 1):
        a *= j
    result += a

print(result)
